<h1><%= "#{@player.name} -- #{@player.score} points" %></h1>
<table>
	<tr>
		<td>
			<div>GAMES PLAYED: <%= @player.games_played %> / <%= @player.pairs.length%></div>
			<div><%= link_to "back", players_path %></div>
		</td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td>
			<div style="text-align: center;font-weight: bold"><%= @pairs.empty? ? "" : "----UNPLAYED GAMES----" %></div>
		</td>
		<td>&nbsp;</td>
	</tr>
	<% @pairs.each do |pair| %>
	<tr>
		<td>
			<div><%=link_to("#{pair.p1.name} and #{pair.p2.name}", edit_pair_path(pair.id))%>  VS. <%="#{pair.opponent.p1.name} and #{pair.opponent.p2.name}" %></div>
		</td>
		<td>&nbsp;</td>
	</tr>
	<% end %>
	<tr>
		<td>
			<div style="text-align: center;font-weight: bold"><%= @wins.empty? ? "" : "----WINS----" %></div>
		</td>
		<td>
			<div style="text-align: center;font-weight: bold"><%= @wins.empty? ? "" : "----SCORES----" %></div>
		</td>
	</tr>
	<% @wins.each do |win| %>
	<tr>
		<td>
			<div><%=link_to("#{win.p1.name} and #{win.p2.name}", edit_pair_path(win.id))%>  VS. <%="#{win.opponent.p1.name} and #{win.opponent.p2.name}" %></div>
		</td>
		<td>
			<div style="text-align: center;"><%= win.score %></div>
		</td>
	</tr>
	<% end %>
	<tr>
		<td>
			<div style="text-align: center;font-weight: bold"><%= @losses.empty? ? "" : "----LOSSES----" %></div>
			<% @losses.each do |loss| %>
			<div><%=link_to("#{loss.p1.name} and #{loss.p2.name}", edit_pair_path(loss.id))%>  VS. <%="#{loss.opponent.p1.name} and #{loss.opponent.p2.name}" %></div>
			<% end %>
		</td>
		<td>&nbsp;</td>
	</tr>
</table>

